home *** CD-ROM | disk | FTP | other *** search
- Short: Pragmas, LVOs for Aztec, Dice, SAS, Maxon
- Type: dev/misc
- Author: wiedmann@zdv.uni-tuebingen.de
- Uploader: wiedmann@zdv.uni-tuebingen.de
-
-
- fd2pragma is a utility which creates so-called pragma and LVO files
- for using shared libraries. Of course you need FD files that describe
- how to call the library. (The best way to get the system FD files is
- to buy the NDU. See the AmigaFAQ for details.)
-
- fd2pragma is nothing special. Most compilers have such a utility. But
- my version has some advantages:
-
- - Different pragma formats available; supported formats are:
-
- Program Filename (example) pragma format (example)
-
- Aztec-C xxx_lib.h #pragma amicall(xBase,0x1e,xfuncA(a0,d1))
- Maxon xxx_pragmas.h #pragma amicall(xBase,0x1e,xfuncA(a0,d1))
- Dice xxx_pragmas.h #pragma libcall xBase xfuncA 1e 1802
- SAS-C xxx_pragmas.h #pragma libcall xBase xfuncA 1e 1802
-
- - Possibility to create LVO files for assembler. (Aztec-As format, but
- this most assemblers should understand this. SAS-asm does.) LVO
- definitions look like this:
-
- Program Filename (example) LVO format (example)
-
- Aztec-As xxx_lib.asm xdef _LVOxfunc
- _LVOxfunc equ -30
-
- - Possibility to create tagcall pragmas that SAS-C understands. This
- replace the old stub routines when using tag functions with arguments
- on the stack. This is enabled by using certain comments. To create a
- a tagcall pragma for the above function you would put the comment
-
- *tagcall
-
- behind the respective line in the FD file. In SAS mode fd2pragma would
- produce this:
-
- #ifdef __SASC_60
- #pragma tagcall xBase xfunc 1e 1802
- #endif
-
- In the above example we got the name of the tagcall function by removing
- the character 'A' from the original name. This is the usual behaviour
- of Commodore for now, as far as I know and hence this is the default.
- But how to produce a tagcall SystemTags from System? We would say
-
- *tagcalltags
-
- fd2pragma would put the word tags behind the original word System by
- uppercasing the first character. (This is like in MUIMaster_lib.fd.)
- Finally you have the possibility to use something like
-
- *tagcall =SystemTags
-
- This would tell fd2pragma the exact name of the tagcall function. (The
- above possibilities are for compatibility with MUIMaster_lib.fd, which
- gave me the idea.)
-
- Note, that the original FD files from Commodore don't have these
- comments!
-
- - Possibility to create stub routines for other compilers. (Don't look
- at these stubs: They look BCPL-like, horrible! But I hope, they'll
- work. ;-)
-
-
-
- The command template pf fd2pragma is
-
- fd2pragma FDFILE/A,AZTEC/K,AS/K,DICE/K,SAS/K,MAXON/K,TAGDIR/K
-
- where "FDFILE" is the file to convert. The arguments AZTEC, AS (Aztec-As),
- DICE, SAS and MAXON are the pragma or LVO files that should be created.
- The TAGDIR argument is the name of a directory where to place stub routines.
-
-
- This program is in the public domain. Use it as you want, but WITHOUT ANY
- WARRANTY!
-